﻿using System.Data;

namespace GenericsFramework
{
	public static class IDataAdapterExtensions
	{
		/// <summary>
		/// Calls IDataAdapter.Fill() on a new DataSet and returns the results
		/// </summary>
		/// <param name="adapter"></param>
		/// <returns>DataSet</returns>
		public static DataSet Invoke(this IDataAdapter adapter)
		{
			var ds = new DataSet();
			adapter.Fill(ds);
			return ds;
		}
	}
}